# Maintainer: Luca Weiss <luca@z3ntu.xyz>
# Contributor: Bart Ribbers <bribbers@disroot.org>
pkgname=lomiri-ui-toolkit
pkgver=1.3.5100
pkgrel=0
pkgdesc="Qt Components for Lomiri"
arch="all !armhf" # blocked by qt5-qtsystems-dev
url="https://gitlab.com/ubports/development/core/lomiri-ui-toolkit"
license="LGPL-3.0-only"
depends="
	qt5-qtfeedback
	qt5-qtgraphicaleffects
	"
depends_dev="
	eudev-dev
	libevdev-dev
	libnih-dev
	libxi-dev
	lttng-ust-dev
	mir-dev
	qt5-qtfeedback-dev
	qt5-qtgraphicaleffects
	qt5-qtpim-dev
	qt5-qtsvg-dev
	qt5-qtsystems-dev
	"
makedepends="
	$depends_dev
	qt5-qtdeclarative-dev
	qt5-qttools-dev
	"
checkdepends="
	bash
	dbus-test-runner
	diffutils
	grep
	xvfb-run
	"
source="https://gitlab.com/ubports/development/core/lomiri-ui-toolkit/-/archive/$pkgver/lomiri-ui-toolkit-$pkgver.tar.gz
	0001-Remove-debian-isms-from-test-runner.patch
	0002-Don-t-build-app-launch-profiler.patch
	"
subpackages="$pkgname-dev $pkgname-lang"
options="!check" # Several tests fail

build() {
	qmake-qt5 CONFIG+=no_docs
	make
}

check() {
	xvfb-run make check
}

package() {
	make INSTALL_ROOT="$pkgdir" install
}

sha512sums="
42752f329ddbd8bf0f1411493c8826b9751681a007ced97a2a3441593ff7d5bb78f3ae3d849f3fa56a9a6b9a9d87a45ff571597ef1f4f33097fed2a9360ef67c  lomiri-ui-toolkit-1.3.5100.tar.gz
7423ea0f4edececdeab09c4c91686e981ecedc2b7b39d147d604eb1bd8cdb26a1c3b4fad848215a1a8db1197bd3a58fb82651b0e298c52181632ae629c307d9a  0001-Remove-debian-isms-from-test-runner.patch
46a12139eeb09b4a7baba4c020103bff8c7885d65fc88ec2e2f4cbf6d93f0aed8d853da316619cb3bafdde5853517dab0b372132d91a03870b9e06a839a854df  0002-Don-t-build-app-launch-profiler.patch
"
